Cloud Compute Models

Explore different approaches to running applications in the cloud: Virtual Machines, Containers, Serverless, and AWS examples

Virtual Machine
Containers
AWS Lambda
AWS Examples
Quick Quiz

Virtual Machines (VMs)

Virtual Machines provide complete virtualized hardware environments. Each VM includes a full copy of an operating system, the application, necessary binaries, and libraries. VMs are managed by a hypervisor that abstracts the physical hardware.

Application & Dependencies
Guest OS
Hypervisor
Physical Hardware

Isolation

Complete isolation between VMs on the same physical host

Legacy Support

Run applications that require specific OS environments

Security

Strong security boundaries between virtual environments

Containers

Containers package an application with its dependencies into a lightweight, isolated environment. They share the host OS kernel but run in isolated user spaces, making them more efficient than VMs.

Container 1: App + Dependencies
Container 2: App + Dependencies
Container 3: App + Dependencies
Container Engine (e.g., Docker)
Host OS
Physical Hardware

Lightweight

Smaller footprint and faster startup times than VMs

Portability

Run consistently across different environments

Scalability

Easily scale applications with orchestration tools

AWS Lambda (Serverless)

AWS Lambda is a serverless compute service that runs your code in response to events without provisioning servers. You pay only for the compute time you consume, and AWS manages the infrastructure automatically.

Your Function Code
Runtime Environment
OS & Infrastructure
AWS Physical Infrastructure

No Servers

Focus on code without managing infrastructure

Auto-Scaling

Automatically scales with the number of requests

Pay-per-Use

Pay only for the compute time you consume

AWS Compute Services

AWS offers various compute services tailored to different workloads. Choose the right service based on your application requirements.

AWS Lambda: Event-driven functions
Amazon ECS/EKS: Managed container services
Amazon EC2: Virtual servers in the cloud
AWS Fargate: Serverless containers
AWS Global Infrastructure

EC2

Virtual servers with full control over compute resources

ECS/EKS

Managed container orchestration services

Fargate

Serverless compute engine for containers

Quick Quiz

Test your knowledge of cloud compute models!

1. Which compute model provides the strongest isolation between applications?
Virtual Machines
Containers
AWS Lambda
2. What is the primary advantage of serverless (Lambda) over traditional VMs?
Pay only for execution time
More control over the OS
Better performance
3. Which technology shares the host OS kernel among applications?
Containers
Virtual Machines
AWS Lambda